package com.pug.result.valid;


import com.pug.result.ResultEnum;
import com.pug.result.ex.KsdValidationException;

/**
 * @description:
 * @author: xuke
 * @time: 2021/6/26 21:23
 */
public class KAssert {

    public static void isEmpty(Object object,Integer code,String message) {
        if (object == null || "".equals(object)) {
            throw new KsdValidationException(code,message);
        }
    }

    public static void isEmpty(Object object, ResultEnum resultEnum) {
        if (object == null || "".equals(object)) {
            throw new KsdValidationException(resultEnum);
        }
    }
}
